import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ball_lion/resources/styles.dart';
import 'package:ball_lion/module/mine/help/help_html.dart';
import 'package:ball_lion/entity/my/help/help_entity.dart';
import 'package:ball_lion/widgets/base/wqs_text.dart';

class HelpDetailPage extends StatefulWidget {
  const HelpDetailPage({super.key});

  @override
  State<HelpDetailPage> createState() => _HelpDetailPageState();
}

class _HelpDetailPageState extends State<HelpDetailPage> {
  QuestionEntity? entity = Get.arguments;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: Styles.appBar(title: QsText("问题详情")),
      body: SingleChildScrollView(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Container(height: 16),
            QsText(entity?.title ?? "",
                    fontSize: 18, fontWeight: FontWeight.w500)
                .paddingSymmetric(horizontal: 16),
            HelpHtml(content: entity?.content ?? "")
          ],
        ),
      ),
    );
  }
}
